package com.ykq.order.feign;

import com.ykq.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "shop-product")  //http://localhost:8083
public interface ProductFeign { //openfeign框架---
    //com.ykq.mapper.UserMapper接口 findByid  mybatis   xml文件  namespace(com.ykq.mapper.UserMapper)+findByid

    @GetMapping("product/findById/{pid}") //http://localhost:8083/product/findById/2
    public Product findById(@PathVariable("pid")Integer pid);

}
